package org.darcy.service.check.impl;

import java.util.List;

import org.darcy.dao.CheckReasonDetailMapper;
import org.darcy.entity.CheckReasonDetail;
import org.darcy.framework.generic.GenericServiceImpl;
import org.darcy.framework.model.PageData;
import org.darcy.framework.model.PageParam;
import org.darcy.service.check.CheckReasonDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;


/**
 * CheckReasonDetail服务实现
 */
@Service
@Transactional
public class CheckReasonDetailServiceImpl extends GenericServiceImpl<CheckReasonDetail> implements CheckReasonDetailService{
	
	@Autowired
	private CheckReasonDetailMapper mapper;
	
	@Override
	public CheckReasonDetail getDetail(Integer id) {
		CheckReasonDetail record = mapper.selectById(id);
		return record;
	}
	
	@Override
	public PageData<CheckReasonDetail> page(PageParam<CheckReasonDetail> param) {
		PageData<CheckReasonDetail> data = super.getPageData(param);
		return data;
	}
	
	@Override
	public List<CheckReasonDetail> getList(Integer reason_id) {
		QueryWrapper<CheckReasonDetail> q = new QueryWrapper<CheckReasonDetail>();
		q.eq("reason_id", reason_id);
		return this.getList(q);
	}

}
